import { RouterProvider } from "react-router";
import { createBrowserRouter } from "react-router-dom";
import Login from "./views/Login/Login";
import Auth from "./views/Auth";

const router = createBrowserRouter([
    {
        path: "/",
        element: <Auth />,//判断是否已登录，若已登录则返回单词卡主页面，否则重定向到登录页面
    },
    {
        path: "/login",
        element: <Login />,
    },
]);

const App = () => {
    return (
        <div>
            <RouterProvider router={router} />
        </div>
    );
};

export default App;
